Hot unpluggable media storage device

ABSTRACT

Improved techniques for rendering a peripheral device removable (e.g., unpluggable) are disclosed. According to one aspect of the invention, the peripheral device is rendered removable from a host computer without preparatory user actions. In effect, the peripheral device can be automatically prepared for removal in the event that its user removes (unplugs) it from its host computer. According to another aspect of the invention, the peripheral device includes a data storage device that is mounted to a file system of the other computer when the other computer desires access to the data storage device. Otherwise, the data storage device is normally unmounted so that if the peripheral device were to be removed (e.g., unplugged) no harm or damage to data stored therein would occur. These aspects of the invention can be utilized alone or in combination with one another. The invention is particularly well suited for peripheral devices that are media players which are “hot” unpluggable without detrimental consequences.

CROSS REFERENCE TO RELATED APPLICATIONS

This application is a continuation of U.S. patent application Ser. No.10/923,549, filed Aug. 20, 2004 now U.S. Pat. No. 7,146,437, entitled“HOT UNPLUGGABLE MEDIA STORAGE DEVICE,” which is hereby incorporatedherein by reference, which is a continuation of U.S. patent applicationSer. No. 10/277,388, filed Oct. 21, 2002, entitled “HOT UNPLUGGABLEMEDIA STORAGE DEVICE,” now U.S. Pat. No. 6,799,226, which is herebyincorporated herein by reference, and which claims the priority benefitof U.S. Provisional Application No. 60/398,192, filed Jul. 23, 2002, andentitled “HOT UNPLUGGABLE MEDIA STORAGE DEVICE,” which is herebyincorporated herein by reference.

This application is related to (i) U.S. patent application Ser. No.10/118,217, filed Apr. 5, 2002, and entitled “MEDIA PLAYER WITH INSTANTPLAY CAPABILITY,” now U.S. Pat. No. 6,934,812, which is herebyincorporated herein by reference, and (ii) U.S. patent application Ser.No. 10/118,069, filed Apr. 5, 2002, and entitled “INTELLIGENTSYNCHRONIZATION OF MEDIA PLAYER WITH HOST COMPUTER,” which is herebyincorporated herein by reference. This application is also related toU.S. Pat. Nos. 6,121,967 and 6,311,242, which are hereby incorporatedherein by reference.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to computer systems and, moreparticularly, to peripheral devices for computer systems.

2. Description of the Related Art

Peripheral devices are often used to supplement the resources ofcomputer systems. One type of peripheral device is a removable storagemedia device (or portable storage media device) that provides datastorage for a computer system. More particularly, computer systems oftenconnect to one or more removable storage media drives to provideadditional data storage for the computer systems. These storage mediadrives can, for example, be a floppy drive, a Compact-Disc (CD) drive, ahard drive, a removable card drive or a Digital Video Disc (DVD) drive.Such drives can be inserted into media bays of portable computer systemsor can be separately housed peripheral devices.

Physically connecting a peripheral device to a computer system requiresthe electrical connection of the peripheral device to the computersystem. The electrical connection is achieved with at least oneconnector. The connector supplies various signals, including address,data, power, and various other signals, between the peripheral deviceand the computer system. A first half of the connector resides on acable of the peripheral device or on a housing of the peripheral device,and a second half of the connector resides on the housing of thecomputer system or on a cable of the computer system. An insertionaction involves the connection of the first half of the connector on thecable or housing of the peripheral device with the second half of theconnector on the cable or housing of the computer system. By couplingthe two devices using at least one connector, the computer system isable to use the resources of the peripheral device. A removal actioninvolves disconnection of: (i) the first half of the connector from thecable or housing of the peripheral device, (ii) the second half of theconnector from the cable or housing of the computer system, or (iii) thefirst half of the connector from the second half of the connector.

Recently, techniques have been developed that allow the insertion andremoval of peripheral devices from external slots or connectors of acomputer system while the computer system is active. This is generallyreferred to as “hot plugging” or “hot unplugging.” These techniquesprevent electrical damage to the components but are often unable toconfigure the software structures needed by the operating system inorder to utilize the peripheral device.

The removal of a peripheral device that provides data storage, namely, astorage media device, is particularly problematic because data can belost or corrupted. Even if the storage media drive is not being accessedwhen the storage media drive is removed, the storage media drive isavailable for use by the computer system. In such cases, data can belost or damaged by the removal of the storage media drive.

Hence, prior to removal of a storage media drive, it has been necessaryto first inform the operating system of the computer system to preparethe storage media drive for removal. If, instead, a user were to removethe storage media drive without first getting approval from theoperating system, then either data on the storage media drive waspossibly lost or corrupted or the user was required to reinsert thestorage media drive into the computer system so that the operatingsystem can prepare it for removal. For example, once a storage mediadrive has been made available to a computer system, the storage mediadrive can be “locked” to encourage against incorrect removal of thestorage media drive. In general, the “lock” operates to halt processingand to inform the user that they have removed a “locked” storage mediadrive which should be reinserted to prevent possible data loss. Hence,if a “locked” storage media drive were to be removed without first being“unlocked,” the user would be encouraged with a visual warning tore-attach the storage media drive so that its removal can be safelymanaged.

Conventionally, insertion of a connector affiliated with a storage mediadrive would cause a host computer to mount the storage media drive withrespect to the file system of the host computer. However, in order toremove the peripheral storage unit, an icon representing the storagemedia drive could be selected and dragged using the graphical userinterface to a trashcan icon, thereby requesting disconnection.Alternatively, an eject command can request disconnection. In eithercase, the storage media drive would then be unmounted and disconnected.

When a peripheral device is coupled to a host computer and lockedthereto, if the device is removed (i.e., disconnected) withoutrequesting disconnection, a warning can be displayed to notify the userof their improper removal of the device and to request its reinsertion.Hence, conventional approaches merely notify the user that the deviceshould not be removed or, if already removed, should be reconnected.Unfortunately, however, users expect devices to be able to be removed atany time they find it to be convenient. Accordingly, the conventionalsolutions to the removal of such devices are inadequate because theylead to consumer frustration and possibly loss of data. Furthermore,even with the warnings, users may disregard or ignore the warnings orrequest. Accordingly, there is a need for improved solutions tofacilitate removal of peripheral devices (e.g., removable storage mediadevices) from its host computer system.

SUMMARY OF THE INVENTION

Broadly speaking, the invention relates to improved techniques forrendering a peripheral device removable (e.g., unpluggable). Accordingto one aspect of the invention, the peripheral device is renderedremovable from a host computer without preparatory user actions. Ineffect, the peripheral device can be automatically prepared for removalin the event that its user removes (unplugs) it from its host computer.According to another aspect of the invention, the peripheral deviceincludes a data storage device that is mounted to a file system of thehost computer when the host computer desires access to the data storagedevice. Otherwise, the data storage device is normally unmounted so thatif the peripheral device were to be removed (e.g., unplugged) no harm ordamage to data stored therein would occur. These aspects of theinvention can be utilized alone or in combination with one another. Theinvention is particularly well suited for peripheral devices that aremedia players which are resulting “hot” unpluggable without detrimentalconsequences.

The invention can be implemented in numerous ways, including as amethod, system, device, and computer readable medium. Severalembodiments of the invention are discussed below.

As a computer readable medium including at least computer program codefor accessing a portable electronic device by a host computer over adata link, the portable electronic device having at least storagecapability for storing media data, one embodiment of the inventionincludes at least: computer program code for receiving, at the hostcomputer, an indication that the portable electronic device has beenattached to the host computer via the data link; computer program codefor logically connecting the portable electronic device to a file systemof the host computer once the indication that the portable electronicdevice has been attached to the host computer has been received;computer program code for performing first processing at the hostcomputer which accesses the portable electronic device provided theportable electronic device is attached to the host computer via the datalink; and computer program code for logically disconnecting the portableelectronic device from the file system without detaching the portableelectronic device from the host computer via the data link, thelogically disconnection being performed automatically after completingperformance of the first processing which accesses the portableelectronic device.

As a computer capable of accessing a portable electronic device, theportable electronic device having at least a bus for data transfer and astorage device for storing media content, one embodiment of theinvention includes at least: means for detecting presence of theportable electronic device on the bus associated with the computer;means for mounting the storage device of the portable electronic devicewith a system of the computer; means for accessing the storage deviceover the bus to perform initial processing; and means for unmounting thestorage device of the portable electronic device from the system of thecomputer once the initial processing is completed.

As a computer capable of accessing a handheld electronic device, thehandheld electronic device having at least a bus for data transfer and adata storage device for storing data, one embodiment of the inventionincludes at least a file system for storage of data, and a processor.The processor is configured to (i) detect presence of the handheldelectronic device on the bus associated with the computer, (ii) mountthe data storage device of the handheld electronic device with the filesystem of the computer, (iv) access the data storage device over the busto perform initial processing; and (v) unmount the data storage deviceof the handheld electronic device from the file system of the computeronce the initial processing is completed.

Other aspects and advantages of the invention will become apparent fromthe following detailed description taken in conjunction with theaccompanying drawings which illustrate, by way of example, theprinciples of the invention.

BRIEF DESCRIPTION OF THE DRAWINGS

The invention will be readily understood by the following detaileddescription in conjunction with the accompanying drawings, wherein likereference numerals designate like structural elements, and in which:

FIG. 1 is a block diagram of a remote media access system according toone embodiment of the invention.

FIG. 2 is a block diagram of a remote media access system according toone embodiment of the invention.

FIG. 3 is a block diagram of a media player according to one embodimentof the invention.

FIG. 4 is a flow diagram of media access processing according to oneembodiment of the invention.

FIGS. 5A and 5B are flow diagrams of media access processing accordingto another embodiment of the invention.

DETAILED DESCRIPTION OF THE INVENTION

The invention pertains to improved techniques for rendering a peripheraldevice removable (e.g., unpluggable). According to one aspect of theinvention, the peripheral device is rendered removable from a hostcomputer without preparatory user actions. In effect, the peripheraldevice can be automatically prepared for removal in the event that itsuser removes (unplugs) it from its host computer. According to anotheraspect of the invention, the peripheral device includes a data storagedevice that is mounted to a file system of the host computer when thehost computer desires access to the data storage device. Otherwise, thedata storage device is normally unmounted so that if the peripheraldevice were to be removed (e.g., unplugged) no harm or damage to datastored therein would occur. These aspects of the invention can beutilized alone or in combination with one another. The invention isparticularly well suited for peripheral devices that are media playerswhich are “hot” unpluggable without detrimental consequences.

Embodiments of this aspect of the invention are discussed below withreference to FIGS. 1-5B. However, those skilled in the art will readilyappreciate that the detailed description given herein with respect tothese figures is for explanatory purposes as the invention extendsbeyond these limited embodiments.

FIG. 1 is a block diagram of a remote media access system 100 accordingto one embodiment of the invention. The remote media access system 100includes a media player 102 and a personal computer (host computer) 104.The media player 102 is, for example, a portable, battery-operateddevice. In one embodiment, the media player 102 is a handheld mediaplayer 102 such as a MP3 player. The media player 102 is capable ofbeing connected or attached to the host computer 104 through a data link106. As shown in FIG. 1, the data link is represented by a cable. Thehost computer 104 includes a bus interface 108, an operating system 110and an application 112. The application 112 typically performsprocessing on the host computer 104 that requires data to be read fromor stored to the media player 102. The operating system 110 serves toprovide a software layer between the application 112 and hardwareinterface components of the host computer 104. The operating system 110can utilize the bus interface 108 that couples to the bus link 106 andtherefore to the media player 102. When the bus link 106 is a cable,each end of the cable can have a connector that couples to a port orconnector, such as a port or connector 114 of the host computer 104 anda port or connector 116 of the media player 102. In one example, theports/connectors can be IEEE 1394 (FireWire®) ports/connectors and theperipheral cable 106 can be a FireWire® cable.

In one embodiment, the media player is a portable computing devicededicated to processing media such as audio, video or images. Forexample, the media player 102 can be a music player (e.g., MP3 player),a game player, a video player, a video recorder, a camera, an imageviewer and the like. These devices are generally battery operated andhighly portable so as to allow a user to listen to music, play games orvideo, record video or take pictures wherever the user travels. In oneimplementation, the media player is a handheld device that is sized forplacement into a pocket or hand of the user. By being handheld, themedia player is relatively small and easily handled and utilized by itsuser. By being pocket sized, the user does not have to directly carrythe device and therefore the device can be taken almost anywhere theuser travels (e.g., the user is not limited by carrying a large, bulkyand often heavy device, as in a portable computer). Furthermore, thedevice may be operated by the users hands, no reference surface such asa desktop is needed.

FIG. 2 is a block diagram of a remote media access system 200 accordingto one embodiment of the invention. The media synchronization system 200includes a media player 202 and a personal computer (host computer) 204.The personal computer 204 includes a media device manager 206. Thepersonal computer 204 further includes a media database 208. The mediaplayer 202 includes a media database 210. Typically, according to oneembodiment, the media player 202 will also include a data storage device(e.g., disk drive) for storing media content, a cache memory for storingmedia content in-use, a screen display for displaying information to auser, and a processor (e.g., microprocessor) for controlling operationof the media player 202. The screen display is often small. In otherembodiments, the media player does not include a screen display.

A peripheral cable 212 provides a data path (or data link) between themedia player 202 and the personal computer 204. The peripheral cable 212provides a peripheral bus that couples the media player 202 to thepersonal computer 204. The peripheral bus, for example, could be a IEEE1394 bus (i.e., FireWire® bus) or a Universal Serial Bus (USB).Alternatively, the peripheral cable 212 can be replaced by a wirelesslink.

The media device manager 206 can manage access to the media player 202by the personal computer 204 over the peripheral cable 212. When themedia device manager 206 detects that the media player 202 is physicallycoupled to the personal computer 204 via the peripheral cable 212, thenthe media device manager 206 can mount the data storage device asneeded, but otherwise retain the data storage device unmounted. Whenmounted, the personal computer 204 can access the data storage devicewithin the media player 202.

Although the need for access to the data storage device of the mediaplayer 202 can vary widely depending on application, one suchapplication is a synchronization operation between the media contentstored on the personal computer 204 and the media content stored on themedia player 202. With such an application, the data storage devicewould be mounted and thus accessible during synchronization but thenunmounted once synchronization has completed. Such synchronization canbe achieved in a sophisticated manner through comparison of mediainformation stored in the respective media databases 208 and 210. Whencomparison of the media information from the respective databases 208and 210 indicates that there is a particular media item resident on thepersonal computer 204 but not on the media player 202, then theparticular media item can be transmitted (downloaded) to the mediaplayer over the peripheral cable 212. On the other hand, when thecomparison of the media information from the respective databases 208and 210 indicates that a particular media item is resident on the mediaplayer 202 but not on the personal computer 204, then the particularmedia item can be either removed (deleted) from the media player 202 ortransmitted (e.g., uploaded) over the peripheral cable 212 to thepersonal computer 204. Hence, by providing the media player 202 with themedia database 210, more sophisticated synchronization and management ofmedia content is enabled. The media database 210 also allows the mediaplayer 202 to present a user interface to the user that is moresophisticated than conventional approaches. Such a user interface can bepresented on the screen display of the media player 202. The userinterface can, for example, allow the user of the media player 202 tobrowse, sort, search, play, etc. the media content resident on the mediaplayer 202. The user interface can also allow the user of the mediaplayer 202 to download (add) or delete (remove) media items from themedia player 202. The media manager 206 also has a user interface thatallows a user to browse, sort, search, play, make playlists, burnCompact Discs (CDs), etc. the media content resident on the personalcomputer 204. The user interface can also allow the user of the personalcomputer 204 to download (add) or delete (remove) media items from thepersonal computer 204. In one embodiment, the media manager 206 and itsassociated user interface are provided by iTunes, version 2.0, fromApple Computer, Inc. of Cupertino, Calif.

FIG. 3 is a block diagram of a media player 300 according to oneembodiment of the invention. The media player 300 includes a processor302 that pertains to a microprocessor or controller for controlling theoverall operation of the media player 300. The media player 300 storesmedia data pertaining to media items in a file system 304 and a cache306. The file system 304 is, typically, a storage disk or a plurality ofdisks. Alternatively, the file system 304 can be implemented by othertypes of non-volatile memory (e.g., FLASH memory). The file system 304typically provides high capacity storage capability for the media player300. However, since the access time to the file system 304 is relativelyslow, the media player 300 can also include a cache 306. The cache 306is, for example, Random-Access Memory (RAM) provided by semiconductormemory. The relative access time to the cache 306 is substantiallyshorter than for the file system 304. However, the cache 306 does nothave the large storage capacity of the file system 304. Further, thefile system 304, when active, consumes more power than does the cache306. The power consumption is particularly important when the mediaplayer 300 is a portable media player that is powered by a battery (notshown). The media player 300 also includes a RAM 320 and a Read-OnlyMemory (ROM) 322. The ROM 322 can store programs, utilities or processesto be executed in a non-volatile manner. The RAM 320 provides volatiledata storage, such as for the cache 306.

The media player 300 also includes a user input device 308 that allows auser of the media player 300 to interact with the media player 300. Forexample, the user input device 308 can take a variety of forms, such asa button, keypad, dial, etc. Still further, the media player 300includes a display 310 (screen display) that can be controlled by theprocessor 302 to display information to the user. A data bus 311 canfacilitate data transfer between at least the file system 304, the cache306, the processor 302, and the CODEC 312.

In one embodiment, the media player 300 serves to store a plurality ofmedia items (e.g., songs) in the file system 304. When a user desires tohave the media player play a particular media item, a list of availablemedia items is displayed on the display 310. Then, using the user inputdevice 308, a user can select one of the available media items. Theprocessor 302, upon receiving a selection of a particular media item,supplies the media data (e.g., audio file) for the particular media itemto a coder/decoder (CODEC) 312. The CODEC 312 then produces analogoutput signals for a speaker 314. The speaker 314 can be a speakerinternal to the media player 300 or external to the media player 300.For example, headphones or earphones that connect to the media player300 would be considered an external speaker.

The media player 300 also includes a bus interface 316 that couples to adata link 318. The data link 318 allows the media player 300 to coupleto a host computer.

FIG. 4 is a flow diagram of media access processing 400 according to oneembodiment of the invention. The media access processing 400 is, forexample, performed by the media device manager 206 of the personalcomputer (host computer) 204 illustrated in FIG. 2 or the bus interfaces108 of the host computer 104 illustrated in FIG. 1.

The media access processing 400 can be invoked when it is discoveredthat a media device has recently been attached to the host computer.Once invoked, the media access processing 400 identifies 402 the mediadevice recently attached to the host computer.

The media device is then logically connected 404 to the file system ofthe host computer. Hence, the attaching of the media device to the hostcomputer pertains to a physical connection or coupling of the mediadevice to the host computer. Typically, such attachment is made via adata link. The data link is typically a cable having a connector at oneor both ends, but can also be a wireless data link. The logicalconnection of the media device to the file system operates to configurethe host computer to be able to access the media device. In particular,the media device typically includes a storage device, such as a datastorage disk. In one embodiment, the logical connection involvesmounting of the storage device of the media device to the file system ofthe host computer.

Media-based processing is then performed 406 to access the media device(i.e., the storage device of the media device). After the media-basedprocessing has been performed 406, the media device is logicallydisconnected 408 from the file system of the host computer. In oneembodiment, this involves an “unmounting” of the storage device of themedia device from the file system of the host computer. At this point,although logically disconnected, the media device remains attached(e.g., physically connected) to the host computer.

Next, a decision 410 determines whether the media device has beendetached from the host computer. When the decision 410 determines thatthe media device has been detached, then the media device processing 400is complete and ends as the media device has been physically detachedfrom the host computer and thus no longer communicates with or isaccessible by the host computer. On the other hand, when the decision410 determines that the media device has not been detached from the hostcomputer, then a decision 412 determines whether access to the mediadevice is needed. As an example, access to the media device would beneeded if subsequent processing is about to be invoked (or desirous ofbeing invoked), which would need to access the media device. Forexample, applications normally receive or obtain instructions pertainingto such subsequent processing. Hence, when the decision 412 determinesthat access to the media device is not needed, then the media accessprocessing 400 returns to repeat the decision 410 and subsequentoperations. In this case, the media device is able to be detachedwhenever desired. In other words, the media device is “hot” unpluggableat this point. Alternatively, when the decision 412 determines thataccess to the media device is now (or soon to be) needed, then the mediaaccess processing 400 returns to repeat the operation 404 and subsequentoperations so that the media device can be again logically connected tothe file system to support access thereto by the host computer, and thensubsequently, logically disconnecting the media device from the filesystem.

FIGS. 5A and 5B are flow diagrams of media access processing 500according to another embodiment of the invention. The media accessprocessing 500 is, for example, performed by the media device manager206 of the personal computer (host computer 204) illustrated in FIG. 2.

The media access processing 500 begins with a decision 502 thatdetermines whether a new storage device is present on a bus. Typically,the bus is a peripheral bus associated with the host computer. When thedecision 502 determines that a new storage device is not now present onthe bus, then the decision 502 causes the media access processing 500 towait for the existence of a new storage device on the bus. Once thedecision 502 determines that there is a new storage device present onthe bus, then the storage device is mounted 504 with the file system ofthe host computer.

Next, a decision 506 determines whether the storage device is a mediadevice. When the decision 506 determines that the storage device is nota media device, then other processing 508 can be performed. Such otherprocessing 508 is unrelated to the access processing for gaining accessto media content stored on a media device and thus is not furtherdiscussed herein. On the other hand, when the decision 506 determinesthat the storage device is a media device, then the storage device isaccessed 510 to perform initial media-based processing. The initialmedia-based processing can serve a wide variety of functions or uses foreither the media device or the host computer. In one embodiment, theinitial media-based processing pertains to synchronization of the mediacontent between the host computer and the media player. For additionaldetails on synchronization processing, see U.S. patent application Ser.No. 10/118,069, filed Apr. 5, 2002, and entitled “INTELLIGENTSYNCHRONIZATION OF MEDIA PLAYER WITH HOST COMPUTER,” which is herebyincorporated herein by reference. Specifically, in this applicationbeing incorporated, operations 610-624 of FIGS. 6A and 6B areparticularly descriptive of appropriate synchronization operations thatcan be performed according to one embodiment. After the initialmedia-based processing has been performed and thus the access to thestorage device completed, the storage device is unmounted 512 from thefile system. At this point, the storage remains physically attached tothe host computer but is eligible to be detached as the user desires.Consequently, the media access processing 500 automatically renders thestorage device removable without any need for user interaction prior toits physical removal.

Next, a decision 514 determines whether the storage device has beenphysically disconnected from the host computer. When the decision 514determines that the storage device has not been physically disconnected,a decision 516 determines whether access to the storage device isneeded. When either the decision 514 determines that the storage devicehas been physically disconnected or when the decision 516 determinesthat access to the storage device is not needed, then a decision 518determines whether the media access processing 500 is done or completed.When the decision 518 determines that the media access processing 500 isdone, then the media access processing 500 ends. Alternatively, when thedecision 518 determines that the media access processing 500 is notdone, then the media access processing 500 returns to repeat thedecision 514 and subsequent operations.

On the other hand, when the decision 516 determines that access to thestorage device is needed, then the storage device is mounted 520 withthe file system of the host computer. Here, since the storage device waspreviously mounted 504 and then unmounted 512, the mounting 520 can alsobe referred to as remounting. After the storage device has been mounted520, the storage device is accessed 522 to perform subsequentmedia-based processing. The subsequent media-based processing pertainsto processing performed by the host computer with respect to the storagedevice (media device) such that processing beyond the initialmedia-based processing is able to be carried out. Following thecompletion of the subsequent media-based processing, the storage deviceis unmounted 524 from the file system. At this point, the storage deviceremains physically attached to the host computer but is eligible to bedetached as the user desires. Hence, the media access processing 500again automatically renders the storage device removable without anyneed for user interaction prior to its physical removal. Following theoperation 524, the media access processing 500 returns to repeat thedecision 514 and subsequent operations.

Accordingly, by unmounting the storage device from the file system afterthe pending media media-based processing which utilizes the storagedevice completes, the storage device (media device) remains in anunmounted condition, for the most part. Stated differently, the defaultposition for the storage device connected to the host computer is in anunmounted condition. When unmounted, the storage device (media device)permits the detachment (or disconnection) of the storage device (mediadevice) from the host computer by the user without any preparatory userinteractions. In other words, since the storage device is unmountable,the storage device (media device) can simply be unplugged from the hostcomputer and none of the host computer, the media device or their datawill be harmed or damaged by such user action.

In one embodiment, the storage device (media device) is considered as aremovable media device or virtual removable drive. The storage devicethus emulates the removability of a floppy, CD-ROM drive or memory card.In this embodiment, the host computer can initiate a “disk inserted”message to trick itself into thinking that a new removable media (e.g.,disk) has just been inserted. As a result, the media device can berecognized and the media can be mounted even though the media device wasnever physically detached from the host computer after being previouslyrecognized and mounted. The remount occurs without user interaction witheither the host computer or the media player.

Optionally, instead of using the default condition as being unmounted,the data storage device within the media player can remain normallymounted. For example, the data storage device of the media player canremain mounted until a specific request to unmount. This optionalapproach can be utilized in a “hard drive” mode where the data storagedevice of the media player operates as a mass storage device (i.e., harddrive) for the host computer.

The invention can be implemented in software, hardware or a combinationof hardware and software. The invention can also be embodied as computerreadable code on a computer readable medium. The computer readablemedium is any data storage device that can store data which canthereafter be read by a computer system. Examples of the computerreadable medium include read-only memory, random-access memory, CD-ROMs,magnetic tape, optical data storage devices, and carrier waves. Thecomputer readable medium can also be distributed over network-coupledcomputer systems so that the computer readable code is stored andexecuted in a distributed fashion.

The advantages of the invention are numerous. Different embodiments orimplementations may yield one or more of the following advantages. Oneadvantage of the invention is that peripheral devices, e.g., mediadevices, are able to be “hot” unpluggable without data loss orcorruption. Another advantage of the invention is that peripheraldevices can have “plug-and-play” as well as “remove-and-go”characteristics which better satisfies user needs and usage.

The many features and advantages of the present invention are apparentfrom the written description and, thus, it is intended by the appendedclaims to cover all such features and advantages of the invention.Further, since numerous modifications and changes will readily occur tothose skilled in the art, it is not desired to limit the invention tothe exact construction and operation as illustrated and described.Hence, all suitable modifications and equivalents may be resorted to asfalling within the scope of the invention.

1. A computer readable storage medium including at least computerprogram code for accessing a portable electronic device by a hostcomputer over a data link, the portable electronic device having atleast storage capability for storing media data, said computer readablemedium comprising: computer program code for logically connecting thestorage capability of the portable electronic device to a file system ofthe host computer immediately after the portable electronic device hasbeen physically attached to the host computer via the data link, whereinthere is no polling between the portable electronic device and the hostcomputer in order to establish the logical connection; computer programcode for performing first processing at the host computer which accessesthe portable electronic device provided the portable electronic deviceis attached to the host computer via the data link; and computer programcode for unmounting the storage capability of the portable electronicdevice from the file system without physically detaching the portableelectronic device from the host computer via the data link, the logicaldisconnection being performed automatically after completing performanceof the first processing which accesses the portable electronic device.2. A computer readable storage medium as recited in claim 1, wherein theportable electronic device produces audio output for a user of theportable electronic device based on the media data stored in the storagedevice.
 3. A computer readable storage medium as recited in claim 1,wherein the portable electronic device includes a data storage device,and wherein the unmounting is automatically performed by said computerprogram code for logical disconnection following access to the datastorage device as needed for the first processing.
 4. A computerreadable storage medium as recited in claim 1, wherein following saidlogical disconnection of the portable electronic device, the portableelectronic device is capable of being detached from the host computervia the data link without any preparatory user interactions with eitherthe host computer or the portable electronic device.
 5. A computerreadable storage medium as recited in claim 1, wherein said computerreadable medium further comprises: computer program code forsubsequently determining whether subsequent processing at the hostcomputer requires access to the portable electronic device that islogically disconnected therefrom but remains physically attached to thehost computer via the data link.
 6. A computer readable storage mediumas recited in claim 5, wherein, when said computer program code fordetermining determines that the subsequent processing at the hostcomputer requires access to the portable electronic device, saidcomputer readable medium further comprises: computer program code forre-establishing the logical connection between the portable electronicdevice and the file system of the host computer, wherein there is nopolling between the portable electronic device and the host computer inorder to establish the logical connection; computer program code forperforming, following said logical connection, the subsequent processingat the host computer which accesses the portable electronic device; andcomputer program code for unmounting the storage capability of theportable electronic device from the file system without detaching theportable electronic device from the host computer via the data link,said unmounting being automatically performed after completing access tothe portable electronic device as needed for the subsequent processing.7. A computer readable storage medium as recited in claim 6, wherein theportable electronic device include a data storage device, and whereinthe logical disconnection is automatically performed by said computerprogram code for logical disconnection following access to the datastorage device as needed for the first processing.
 8. A computerreadable storage medium as recited in claim 7, wherein the storagedevice is a disk storage device, and wherein when the portableelectronic device is coupled to the host computer via the data link, theportable electronic device operates as a remote disk storage device forthe host computer.
 9. A computer readable storage medium as recited inclaim 1, wherein the portable electronic device is a handheld device.10. A computer readable storage medium as recited in claim 8, whereinthe handheld device is a media player.
 11. A computer readable storagemedium as recited in claim 1, wherein at least a portion of the datalink is provided over a peripheral cable.
 12. A computer readablestorage medium as recited in claim 1, wherein at least a portion of thedata link is provided through a connector.
 13. A computer readablestorage medium as recited in claim 1, wherein the first processing is asynchronization process for media data whereby the host computertransfers certain media data to the portable electronic device.
 14. Acomputer capable of accessing a portable electronic device, the portableelectronic device having at least a bus for data transfer and a storagedevice for storing media content, said computer comprising: means formounting the storage device of the portable electronic device with afile system of said computer immediately after it has been determinedthat the data transfer bus has been physically attached to the computer,wherein there is no polling between the portable electronic device andthe computer in order for the storage device of the portable electronicdevice to be mounted with the file system; means for accessing thestorage device over the bus to perform initial processing; and means forunmounting the storage device of the portable electronic device from thesystem of the computer once the initial processing is completed.
 15. Acomputer as recited in claim 14, wherein the portable electronic devicealso includes processing circuitry and is associated with at least oneof a display and a speaker, and the portable electronic device beingcapable of itself outputting the media content stored in the storagedevice to at least one of the display and the speaker.
 16. A computer asrecited in claim 14, wherein said computer program code for unmountingoperates to unmount the storage device from the system automaticallywithout any user initiated action to request unmounting.
 17. A computeras recited in claim 14, wherein said computer further comprises: meansfor determining, subsequent to being unmounted, whether access to thestorage device is needed to perform subsequent processing; means forremounting the storage device of the portable electronic device with thesystem of the other computer when it is determined that access to thestorage device is needed; means for accessing the storage device fromthe other computer over the bus to perform the subsequent processing;and means for unmounting the storage device of the portable electronicdevice from the system of the other computer once said accessing for thesubsequent processing is completed.
 18. A computer as recited in claim17, wherein the initial processing is initial media-based processing,and wherein the subsequent processing is subsequent media-basedprocessing.
 19. A computer as recited in claim 18, wherein the portablecomputing device produces audio output for a user of the portableelectronic device from the media content stored in the storage device.20. A computer as recited in claim 14, wherein said computer furthercomprises: means for detecting physical disconnection of the portableelectronic device from the bus associated with the computer.
 21. Acomputer capable of accessing a handheld electronic device, the handheldelectronic device having at least a bus for data transfer and a datastorage device for storing data, said computer comprising: a file systemfor storage of data; and a processor configured to (i) mount the datastorage device of the handheld electronic device to said file system ofsaid computer immediately after the data transfer bus has beenphysically attached to the computer without any polling between thehandheld electronic device and the computer, (ii) access the datastorage device over the bus to perform initial processing; and (iii)unmount the data storage device of the handheld electronic device fromsaid file system of the computer once the initial processing iscompleted.
 22. A computer as recited in claim 21, wherein the handheldelectronic device produces audio output for a user of the handheldelectronic device based on the data stored in the data storage device.23. A computer as recited in claim 21, wherein the unmounting isautomatically performed by said computer following access to the datastorage device once the initial processing is completed.
 24. A computeras recited in claim 21, wherein following said unmounting, the handheldelectronic device is capable of being detached from the computer via thebus without any preparatory user interactions with either the computeror the handheld electronic device.